import 'package:flutter/material.dart';

class ImageCase extends StatelessWidget {
  const ImageCase({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      height: double.infinity,
      alignment: Alignment.center,
      child: SizedBox(
        width: 300,
        height: 300,
        child: Image.network(
            "https://img2.baidu.com/it/u=3692486504,4165575141&fm=253&fmt=auto&app=120&f=JPEG?w=800&h=500",
            // width: double.infinity,
            // height: double.infinity,
            fit: BoxFit.cover // 填充 填充的作用是让图片充满整个容器
            ),
      ),
    );
  }
}
